<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="css/styles.css"/>
</head>
<body>

<div class="htmleaf-container">
    <div class="wrapper">
        <div class="container">
            <div style="text-align:center;margin:0px 0; font:normal 14px/24px 'MicroSoft YaHei';color:#000000">
                <h1>注册</h1>
            </div>


            <h1 style="margin-top: 30px">Welcome</h1>

            <form th:action="@{/register}" method="post">+
                <input type="text" placeholder="username" name="username"/>
                <input type="password" placeholder="password" name="password"/>
                <input type="password" placeholder="rptPassword" name="rptPassword"/>
                <input type="text" placeholder="phone" name="phone"/>
                <input type="text" placeholder="email" name="email"/>
                <button type="submit" onclick="check(this.form)">Register</button>
            </form>

        </div>

        <ul class="bg-bubbles">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</div>

<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script>
    $('#login-button').click(function (event) {

        event.preventDefault();
        $('form').fadeOut(500);
        $('.wrapper').addClass('form-success');
    });

    function check(form) {
        if (form.username.value == '') {
            alert("请输入用户帐号!");
            form.username.focus();
            return false;
        }
        if (form.password.value == '') {
            alert("请输入密码!");
            form.password.focus();
            return false;
        }
        if (form.rptPassword.value == '') {
            alert("请输入密码!");
            form.password.focus();
            return false;
        }
        if (form.phone.value == '') {
            alert("请输入电话!");
            form.password.focus();
            return false;
        }
        document.myform.submit();
    }
</script>


</body>
</html>